
cc.Class({
    extends: cc.Component,

    properties: {
        content:cc.Label,
        _ok_call:null,
        _cancel_call:null,
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },
    init(tipEvent){
        this.content.string = tipEvent.content;
        this._ok_call = tipEvent.ok_call;
        this._cancel_call = tipEvent.cancel_call
    },
    ok_click(){
        if(this._ok_call){
            this._ok_call();
        }
        this.node.destroy();
    },
    cancel_click(){
        if(this._cancel_call){
            this._cancel_call();
        }
        this.node.destroy();
    },
    // update (dt) {

    // },
});
